package online.afeibaili.storebackendframework.mapper;

import online.afeibaili.storebackendframework.model.AdminInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminInfoMapper {
    @Insert("insert into admin_info(user,token) values(#{user},#{token})")
    int insert(AdminInfo adminInfo);
    @Select("select * from admin_info where token = (#{token})")
    AdminInfo selectByToken(String token);
    //总数
    @Select("select count(*) from admin_info")
    int count();
}
